const routes = {
  host: '/',
  admin: '/admin',
  users: '/users'
} as const // as const类型收窄，把字符串类型收窄为字面量类型

const gotoRoute = (r: '/' | '/admin' | '/users' ) => {}

// 提示类型不一致
gotoRoute(routes.admin)
